Other Functions
The following functions are available globally.
-
Creates a new
MGLMapPointfrom the given X and Y coordinates, and zoom level.Declaration
Objective-C
static inline MGLMapPoint MGLMapPointMake(CGFloat x, CGFloat y, CGFloat zoomLevel)Swift
func MGLMapPointMake(_ x: CGFloat, _ y: CGFloat, _ zoomLevel: CGFloat) -> MGLMapPoint -
Creates a new
MGLCoordinateQuadstructure from the given top left, bottom left, bottom right, and top right coordinates.Declaration
Objective-C
static inline MGLCoordinateQuad MGLCoordinateQuadMake( CLLocationCoordinate2D topLeft, CLLocationCoordinate2D bottomLeft, CLLocationCoordinate2D bottomRight, CLLocationCoordinate2D topRight)Swift
func MGLCoordinateQuadMake(_ topLeft: CLLocationCoordinate2D, _ bottomLeft: CLLocationCoordinate2D, _ bottomRight: CLLocationCoordinate2D, _ topRight: CLLocationCoordinate2D) -> MGLCoordinateQuad -
Creates a new
MGLCoordinateQuadstructure from the givenMGLCoordinateBounds. The returned quad uses the bounds’ northeast coordinate as the top right, and the southwest coordinate at the bottom left.Declaration
Objective-C
static inline MGLCoordinateQuad MGLCoordinateQuadFromCoordinateBounds(MGLCoordinateBounds bounds)Swift
func MGLCoordinateQuadFromCoordinateBounds(_ bounds: MGLCoordinateBounds) -> MGLCoordinateQuad -
Returns a formatted string for the given coordinate quad.
Declaration
Objective-C
static inline NSString *_Nonnull MGLStringFromCoordinateQuad( MGLCoordinateQuad quad)Swift
func MGLStringFromCoordinateQuad(_ quad: MGLCoordinateQuad) -> String -
Returns Mercator projection of a WGS84 coordinate at the specified zoom level.
Declaration
Objective-C
extern MGLMapPoint MGLMapPointForCoordinate(CLLocationCoordinate2D coordinate, double zoomLevel)Swift
func MGLMapPointForCoordinate(_ coordinate: CLLocationCoordinate2D, _ zoomLevel: Double) -> MGLMapPoint
-
Creates a new
MGLSphericalPositionfrom the given radial, azimuthal, polar.Declaration
Objective-C
static inline MGLSphericalPosition MGLSphericalPositionMake(CGFloat radial, CLLocationDirection azimuthal, CLLocationDirection polar)Swift
func MGLSphericalPositionMake(_ radial: CGFloat, _ azimuthal: CLLocationDirection, _ polar: CLLocationDirection) -> MGLSphericalPositionParameters
radialThe radial coordinate.
azimuthalThe azimuthal angle.
polarThe polar angle.
Return Value
Returns a
MGLSphericalPositionstruct containing the position attributes.
-
Creates a new
MGLTransitionfrom the given duration and delay.Declaration
Objective-C
static inline MGLTransition MGLTransitionMake(NSTimeInterval duration, NSTimeInterval delay)Swift
func MGLTransitionMake(_ duration: TimeInterval, _ delay: TimeInterval) -> MGLTransitionParameters
durationThe amount of time the animation should take, not including the delay.
delayThe amount of time in seconds to wait before beginning the animation.
Return Value
Returns a
MGLTransitionstruct containing the transition attributes.
Install in Dash
Other Functions Reference